<?php

namespace addons\zzarticle;

use app\common\library\Menu;
use think\Addons;

class Zzarticle extends Addons
{
    public function install()
    {
        Menu::delete('zzarticle');
        Menu::create([
            [
                'name'    => 'zzarticle',
                'title'   => '文章管理',
                'icon'    => 'fa fa-book',
                'ismenu'  => 1,
                'weigh'   => 99998,
                'sublist' => [
                    [
                        'name'   => 'zzarticle/article',
                        'title'  => '文章列表',
                        'ismenu' => 1,
                    ],
                    [
                        'name'   => 'zzarticle/article_type',
                        'title'  => '文章类型',
                        'ismenu' => 1,
                    ],
                ]
            ]
        ]);
        return true;
    }

    public function uninstall()
    {
        return true;
    }
}
